//
//  XinButton.m
//  grainHouse
//
//  Created by 北风 on 14-10-19.
//  Copyright (c) 2014年 北风. All rights reserved.
//

#import "XinButton.h"

@implementation XinButton
- (void)dealloc
{
    [_number release];
    [_button release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
       
        _button = [UIButton buttonWithType:UIButtonTypeCustom];
        [_button setFrame:CGRectMake(0, 2, 20, 20)];
        //[_button setBackgroundColor:[UIColor redColor]];

        [self addSubview:_button];
    
        _number = [[UILabel alloc] initWithFrame:CGRectMake(_button.frame.origin.x + _button.frame.size.width + 4, _button.frame.origin.y + 2, 15, 15)];
        [self addSubview:_number];
        
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
